package com.ktgj.flight.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.flight.mapper.FlightOrderInvoiceMapper;
import com.ktgj.flight.domain.FlightOrderInvoice;
import com.ktgj.flight.service.IFlightOrderInvoiceService;

/**
 * 机票订单发票Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-13
 */
@Service
public class FlightOrderInvoiceServiceImpl implements IFlightOrderInvoiceService 
{
    @Autowired
    private FlightOrderInvoiceMapper flightOrderInvoiceMapper;

    /**
     * 查询机票订单发票
     * 
     * @param invoiceId 机票订单发票ID
     * @return 机票订单发票
     */
    @Override
    public FlightOrderInvoice selectFlightOrderInvoiceById(Long invoiceId)
    {
        return flightOrderInvoiceMapper.selectFlightOrderInvoiceById(invoiceId);
    }

    /**
     * 查询机票订单发票列表
     * 
     * @param flightOrderInvoice 机票订单发票
     * @return 机票订单发票
     */
    @Override
    public List<FlightOrderInvoice> selectFlightOrderInvoiceList(FlightOrderInvoice flightOrderInvoice)
    {
        return flightOrderInvoiceMapper.selectFlightOrderInvoiceList(flightOrderInvoice);
    }

    /**
     * 新增机票订单发票
     * 
     * @param flightOrderInvoice 机票订单发票
     * @return 结果
     */
    @Override
    public int insertFlightOrderInvoice(FlightOrderInvoice flightOrderInvoice)
    {
        flightOrderInvoice.setCreateTime(DateUtils.getNowDate());
        return flightOrderInvoiceMapper.insertFlightOrderInvoice(flightOrderInvoice);
    }

    /**
     * 修改机票订单发票
     * 
     * @param flightOrderInvoice 机票订单发票
     * @return 结果
     */
    @Override
    public int updateFlightOrderInvoice(FlightOrderInvoice flightOrderInvoice)
    {
        return flightOrderInvoiceMapper.updateFlightOrderInvoice(flightOrderInvoice);
    }

    /**
     * 批量删除机票订单发票
     * 
     * @param invoiceIds 需要删除的机票订单发票ID
     * @return 结果
     */
    @Override
    public int deleteFlightOrderInvoiceByIds(Long[] invoiceIds)
    {
        return flightOrderInvoiceMapper.deleteFlightOrderInvoiceByIds(invoiceIds);
    }

    /**
     * 删除机票订单发票信息
     * 
     * @param invoiceId 机票订单发票ID
     * @return 结果
     */
    @Override
    public int deleteFlightOrderInvoiceById(Long invoiceId)
    {
        return flightOrderInvoiceMapper.deleteFlightOrderInvoiceById(invoiceId);
    }
}
